package com.authority.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.authority.entry.AuthMenuActionDO;
import com.authority.query.AuthMenuActionQuery;

public interface AuthMenuActionDAO {
	
	List<AuthMenuActionDO> queryAuthMenuAction(AuthMenuActionQuery query);
	
	AuthMenuActionDO queryAuthMenuActionById(Long id);
	
	Long insertAuthMenuAction(AuthMenuActionDO db);
	
	int deleteAuthMenuActionByIds(String ids);
	
	int updateAuthMenuAction(AuthMenuActionDO db);
	
	int deleteAuthMenuAction(Long menuId);
	
	int queryAuthMenuActionCount(AuthMenuActionQuery query);
	
	
	/**
	 * 根据菜单id和系统id查
	 * @param menuId
	 * @param sysId
	 * @return
	 */
	List<AuthMenuActionDO> queryAuthMenuActionByMenuIdAndSysId(@Param("menuId")Long menuId,@Param("sysId")Long sysId);

	/**
	 * 根据系统id查
	 * @param sysId
	 * @return
	 */
	List<AuthMenuActionDO> queryAuthMenuActionBySysId(Long sysId);
	
	/**
	 * 批量插入
	 * @param map
	 */
	void batchInsertAuthMenuAction(List<AuthMenuActionDO> map);
	
	/**
	 * 根据菜单id和系统id删
	 * @param menuId
	 * @param sysId
	 * @return
	 */
	int deleteAuthMenuActionByMenuIdAndSysId(@Param("menuId")Long menuId,@Param("sysId")Long sysId);

}
